package org.springblade.modules.dingtalk.controller;

import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.launch.constant.AppConstant;
import org.springblade.core.secure.annotation.PreAuth;
import org.springblade.core.tenant.annotation.NonDS;
import org.springblade.core.tool.constant.RoleConstant;
import org.springblade.modules.dingtalk.entity.DeptSyncOU;
import org.springblade.modules.dingtalk.service.IDeptSyncOUService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import java.util.ArrayList;
import java.util.List;

@NonDS
@ApiIgnore
@RestController
@AllArgsConstructor
@RequestMapping("ding-talk/sync")
@Api(value = "钉钉同步", tags = "钉部门信息同步")

public class DeptSyncOUController extends BladeController {

	private IDeptSyncOUService deptSyncOUService;

	@GetMapping("/getAll")
	public List<DeptSyncOU> getAll(){
		List<DeptSyncOU> list = new ArrayList<>();
		return deptSyncOUService.getDeptTreeList(list);
	}










}
